﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;

namespace HIWSystem.Models
{
    public class SNEntity : ViewModelBase
    {
        /// <summary>
        /// 序列号
        /// </summary>
        public string SN { get; set; }
        /// <summary>
        /// 工单
        /// </summary>
        public string WO { get; set; }
        /// <summary>
        /// 机种
        /// </summary>
        public string PN { get; set; }
        /// <summary>
        /// 已经完成测试的站位
        /// </summary>
        public string CompletedStation { get; set; }
        /// <summary>
        /// 待测试的站位
        /// </summary>
        public string PretestStation { get; set; }
        /// <summary>
        /// 是否入库
        /// </summary>
        public string IsEnd { get; set; }
        /// <summary>
        /// 工号
        /// </summary>
        public string Actor { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateAt { get; set; }
        /// <summary>
        /// 年份
        /// </summary>
        public string Year { get; set; }
        /// <summary>
        /// 
        /// </summary>
        private bool isChecked;
        /// <summary>
        /// 列表框中的复选框选中状态
        /// </summary>
        public bool IsChecked
        {
            get { return isChecked; }
            set { isChecked = value; this.RaisePropertyChanged(() => IsChecked); }
        }
        private RelayCommand lstPreprintSnClick;

        public RelayCommand LstPreprintSnClick
        {
            get 
            {
                if (lstPreprintSnClick == null)
                {
                    lstPreprintSnClick = new RelayCommand(()=> {
                        Messenger.Default.Send<string>("OK", "LstPreprintSnClickCmd");
                    });
                }
                return lstPreprintSnClick;
            }
            set { lstPreprintSnClick = value; }
        }

    }
}
